#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

class Solution 
{
public:
    void duplicateZeros(vector<int>& arr)
    {
        int zero_count = 0;
        for (int i = 0; i < arr.size(); i++)
        {
            if (arr[i] == 0)
                zero_count++;
        }
        if (zero_count)
        {
            int right = arr.size();
            int left = arr.size() - 1;
            while (left && right)
            {
                while (arr[left] != 0 && left)
                {
                    left--;
                }
                right = arr.size();
                while (right != left)
                {
                    arr[right] = arr[right - 1];
                    right--;
                }
            }

        }

    }
};

int main()
{
    return 0;
}